bitkeeper revision 1.1582 (429838acDJZ12SHZ0oEfuJwBD4FoqQ)
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 28 May 2005 09:23:56 +0000 (09:23 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 28 May 2005 09:23:56 +0000 (09:23 +0000)
Make cpuid() less fussy about the type of its pointer parameters.
This fixes the build with gcc4.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/include/asm-x86/processor.h

index 6fc44ade5d6d8613e1b1ab34ff732c74e92a69c2..e054eb22b045ff5a9388b23683dcf41cad4a3684 100644 (file)
@@ -199,17 +199,13 @@ static inline void detect_ht(struct cpuinfo_x86 *c) {}
  * clear %ecx since some cpus (Cyrix MII) do not set or clear %ecx
  * resulting in stale register contents being returned.
  */
-static inline void cpuid(
-    int op, unsigned int *eax, unsigned int *ebx,
-    unsigned int *ecx, unsigned int *edx)
-{
-    __asm__("cpuid"
-            : "=a" (*eax),
-              "=b" (*ebx),
-              "=c" (*ecx),
-              "=d" (*edx)
-            : "0" (op), "2" (0));
-}
+#define cpuid(_op,_eax,_ebx,_ecx,_edx)          \
+    __asm__("cpuid"                             \
+            : "=a" (*(int *)(_eax)),            \
+              "=b" (*(int *)(_ebx)),            \
+              "=c" (*(int *)(_ecx)),            \
+              "=d" (*(int *)(_edx))             \
+            : "0" (_op), "2" (0))
 
 /*
  * CPUID functions returning a single datum